package cn.ltgodm.moj.controller;

import cn.ltgodm.moj.model.vo.QuestionSubmitVO;
import cn.ltgodm.moj.service.JudgeFeignClient;
import cn.ltgodm.moj.service.JudgeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ltgodm
 * @date 2024-03-13 22:56:48
 */
@RestController
@RequestMapping("/inner")
@Slf4j
public class JudgeInnerController implements JudgeFeignClient {

    @Resource
    JudgeService judgeService;

    @Override
    public QuestionSubmitVO doJudge(Long questionSubmitId) {
        QuestionSubmitVO questionSubmitVO = judgeService.doJudge(questionSubmitId);
        log.info("判题结果：{}",questionSubmitVO);
        return questionSubmitVO;
    }
}
